import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner s = new Scanner(System.in);
        int i = s.nextInt();
        Animal a = null;
        if (i == 1) {
            a = new Cat(s.next(), s.next(), s.next());
        } else if (i == 2) {
            a = new Dog(s.next(), s.next(), s.nextInt());
        }
        TestAnimal.introduce(a);
        TestAnimal.action(a);

    }
}

abstract class Animal {
    protected String name;
    protected String color;
    public Animal(String name, String color) {
        this.name = name;
        this.color = color;
    }
    public abstract void introduce();
    public abstract void action();
}

class Cat extends Animal {
    protected String eyecolor;

    public Cat(String name, String color, String eyecolor) {
        super(name,color);
        this.eyecolor = eyecolor;
    }

    public void introduce() {
        System.out.printf("My name is %s, my color is %s, my eyecolor is %s\n",
                this.name, this.color, this.eyecolor);
    }
    public void action(){
        System.out.println("catch mouse");
    }
}

class Dog extends Animal {
    protected int iq;

    public Dog(String name, String color, int iq) {
        super(name,color);
        this.iq = iq;
    }
    public void introduce() {
        System.out.printf("My name is %s, my color is %s, my IQ is %s\n",
                this.name, this.color, this.iq);
    }
    public void action(){
        System.out.println("catch frisbee");
    }
}

class TestAnimal {
    static void introduce(Animal obj) {
        obj.introduce();
    }

    static void action(Animal obj) {
        obj.action();
    }
}